<script type="text/javascript" src="../javascripts/jquery.js"></script>
	<script type="text/javascript" src="../javascripts/chili-1.7.pack.js"></script>
	
	<script type="text/javascript" src="../javascripts/jquery.easing.js"></script>
	<script type="text/javascript" src="../javascripts/jquery.dimensions.js"></script>
	<script type="text/javascript" src="../javascripts/jquery.accordion.js"></script>
    
	<script type="text/javascript" src="../javascripts/validation.js"></script>
    <script type="text/javascript" src="../javascripts/jquery-ui-1.7.2.custom.min.js"> </script>
 
    <script type="text/javascript" src="../javascripts/jquery.lightbox-0.5.pack.js"></script>

    <script type="text/javascript" src="../javascripts/prompt.js"></script>
	<script type="text/javascript" src="../javascripts/prompt1.js"></script>
    
    <script type="text/javascript" src="../javascripts/jquery.simplemodal.js"></script>
    <script type="text/javascript" src="../javascripts/tiny_mce/tiny_mce.js"></script>

    <script type="text/javascript" src="../javascripts/jquery.timePicker.js"></script>
   
	<script type="text/javascript" src="lib/jquery.validate.js"></script>
	<script type="text/javascript" src="lib/jquery.validate.password.js"></script>


	<link type="text/css" href="../css/demo.css" rel="stylesheet" />
    <link type="text/css" href="../css/basic.css" rel="stylesheet" />
	<script type="text/javascript">
	
	$(function() {
		// first simple accordion with special markup
		jQuery('#accordion').accordion({
			header: 'div.accordion_list',
			active: true,
			alwaysOpen: false,
			animated: false,
			autoheight: false
		});
	});
		$(function(){
				$('#datepicker').datepicker({
					dateFormat:'dd/mm/yy',
					changeMonth: true,
					changeYear: true,
					yearRange: '-90:+0',
					maxDate: '+0'
				});
	});
	
	$(function(){
	
	$('.pic a').lightBox({
		
		imageLoading: '../javascripts/images/loading.gif',
		imageBtnClose: '../javascripts/images/close.gif',
		imageBtnPrev: '../javascripts/images/prev.gif',
		imageBtnNext: '../javascripts/images/next.gif'

	});
	


});
	
	//datepicker
	 $(function() {
  
    $(".time3, .time4").timePicker();
        $('#basic-modal .bas').click(function (e) {
		$('#basic-modal-content').modal();

	});

    // Store time used by duration.
    var oldTime = $.timePicker(".time3").getTime();
    
    // Keep the duration between the two inputs.
    $(".time3").change(function() {
      if ($(".time4").val()) { // Only update when second input has a value.
        // Calculate duration.
        var duration = ($.timePicker(".time4").getTime() - oldTime);
        var time = $.timePicker(".time3").getTime();
        // Calculate and update the time in the second input.
        $.timePicker(".time4").setTime(new Date(new Date(time.getTime() + duration)));
        oldTime = time;
      }
    });
    // Validate.
    $(".time4").change(function() {
      if($.timePicker(".time3").getTime() > $.timePicker(this).getTime()) {
        $(this).addClass("error");
      }
      else {
        $(this).removeClass("error");
      }
    });
    
  });

$(function() {
	// validate signup form on keyup and submit
	var validator = $("#signupform").validate({
		rules: {
			cpassword: {
				required: true,
				equalTo: "#cpass"
			},
			password: {
				password: "#username"
			},
			password_confirm: {
				required: true,
				equalTo: "#password"
			}
		},
		messages: {
			cpassword: {
				required: "Please enter your current password",
				minlength: jQuery.format("Enter at least {0} characters"),
				equalTo: "Please enter your current password"
			},
			password_confirm: {
				required: "Repeat your password",
				minlength: jQuery.format("Enter at least {0} characters"),
				equalTo: "Enter the same password as above"
			}
		},
		// the errorPlacement has to take the table layout into account
		errorPlacement: function(error, element) {
			error.prependTo( element.parent().next() );
		},
		// set this class to error-labels to indicate valid fields
		success: function(label) {
			// set &nbsp; as text for IE
			label.html("&nbsp;").addClass("checked");
		}
	});
	
	
});
	

	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		skin : "o2k7",
		skin_variant : "black",
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

		// Theme options
		theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,

		// Example content CSS (should be your site CSS)
		content_css : "css/content.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Style formats
		style_formats : [
			{title : 'Bold text', inline : 'b'},
			{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
			{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
			{title : 'Example 1', inline : 'span', classes : 'example1'},
			{title : 'Example 2', inline : 'span', classes : 'example2'},
			{title : 'Table styles'},
			{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
		],

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
	
		function toggleEditor(id) {
		if (!tinyMCE.get(id))
			tinyMCE.execCommand('mceAddControl', false, id);
		else
			tinyMCE.execCommand('mceRemoveControl', false, id);
	}
	</script>
<style>
#basic-modal-content {display:none;}

/* Overlay */
#simplemodal-overlay {background-color:#000; }

/* Container */
#simplemodal-container {height:360px; width:600px; color:#bbb; background-color:#333; border:4px solid #444; padding:12px;}
#simplemodal-container .simplemodal-data {padding:8px;}
#simplemodal-container code {background:#141414; border-left:3px solid #65B43D; color:#bbb; display:block; font-size:12px; margin-bottom:12px; padding:4px 6px 6px;}
#simplemodal-container a {color:#ddd;}
#simplemodal-container a.modalCloseImg {background:url(../images/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-15px; right:-16px; cursor:pointer;}
#simplemodal-container h3 {color:#84b8d9;}

	div.time-picker {
  position: absolute;
  height: 191px;
  width:4em; /* needed for IE */
  overflow: auto;
  background: #fff;
  border: 1px solid #aaa;
  z-index: 99;
  margin: 0;
}
div.time-picker-12hours {
  width:6em; /* needed for IE */
}

div.time-picker ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
div.time-picker li {
  cursor: pointer;
  height: 10px;
  font: 12px/1 Helvetica, Arial, sans-serif;
  padding: 4px 3px;
}
div.time-picker li.selected {
  background: #0063CE;
  color: #fff;
}
	
</style>
<div id="accordion">
<div> 
<!-- Customer -->
<!--/*/*customer side menu*/*/-->

<!-- STudent-->
<? if($_SESSION['user'] == 'student'):

 ?>
<div class="accordion_list"><h3><a href="#">Home</a></h3></div>
	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='student.php'>News&nbsp;&amp;&nbsp;Events</a></span></span></li>
        <li><span class='panel'> <span class='panel_h'><a href='viewSectionStudents.php'>View Classmates</a></span></span></li>
    </ul>
		
	</div>
</div>
 
<div class="accordion_list"><h3><a href="#">Account Settings</a></h3></div>

	<div>
		<ul>
    		<li><span class='panel'> <span class='panel_h'><a href='profile.php?sel=profile'>Profile</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='editProfile.php?sel=changeInfo'>Edit Profile</a></span></span></li>
        <li><span class='panel'> <span class='panel_h'><a href='editPass.php'>Edit Password</a></span></span></li>
		
		</ul>
		
	</div>
<div class="accordion_list"><h3><a href="#">Message</a></h3></div>

	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMessageList.php'>Message Report</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMessageListSent.php'>Message Sent</a></span></span></li>
		</ul>
		
	</div>
<div>
<div class="accordion_list"><h3><a href="#">Forum</a></h3> </div>
	<div>
	<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMakabayan.php'>Makabayan</a></span></span></li>
		    <li><span class='panel'> <span class='panel_h'><a href='viewFilipino.php'>Filipino</a></span></span></li>
             <li><span class='panel'> <span class='panel_h'><a href='viewEnglish.php'>English</a></span></span></li>
             		    	<li><span class='panel'> <span class='panel_h'><a href='viewMath.php'>Math</a></span></span></li>
			 		    	<li><span class='panel'> <span class='panel_h'><a href='viewScience.php'>Science</a></span></span></li>
                            		    	<li><span class='panel'> <span class='panel_h'><a href='viewOthers.php'>Others</a></span></span></li>


             </ul>
</div>

<div class="accordion_list"><h3><a href="#">Examination</a></h3> </div>
	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='testMakabayan.php'>Makabayan</a></span></span></li>
		    <li><span class='panel'> <span class='panel_h'><a href='testFilipino.php'>Filipino</a></span></span></li>
             <li><span class='panel'> <span class='panel_h'><a href='testEnglish.php'>English</a></span></span></li>
             		    	<li><span class='panel'> <span class='panel_h'><a href='testMath.php'>Math</a></span></span></li>
			 		    	<li><span class='panel'> <span class='panel_h'><a href='testScience.php'>Science</a></span></span></li>


             </ul>
</div>
</div>

<div>
<div class="accordion_list"><h3><a href="#">Class Record</a></h3></div>
<div>
<ul>
<li><span class='panel'> <span class='panel_h'><a href='filesharing.php'>My&nbsp;Shared&nbsp;Files</a></span></span></li>

</div>


<li><span class='panel'><span class="panel_r"><a href='?q=logout'>Logout</a></span></span></li>
</ul>

<? endif;?>

<!--Teacher -->
<? if($_SESSION['user'] == 'teacher'):

 ?>
<div class="accordion_list"><h3><a href="#">Home</a></h3></div>

	<div>
		<ul>   
    	<li><span class='panel'> <span class='panel_h'><a href='teacher.php'>News&nbsp;&amp;&nbsp;Events</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='viewStudents.php'>View&nbsp;Students</a></span></span></li>
        <li><span class='panel'> <span class='panel_h'><a href='viewTeachers.php'>View&nbsp;Teachers</a></span></span></li>
		</ul>
		
	</div>
</div>
 
<div class="accordion_list"><h3><a href="#">Account Settings</a></h3></div>

	<div>
		<ul>        
    	<li><span class='panel'> <span class='panel_h'><a href='profile.php?sel=profile'>Profile</a></span></span></li>
       <li><span class='panel'> <span class='panel_h'><a href='editProfile.php?sel=changeInfo'>Edit Profile</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='editPass.php'>Edit Password</a></span></span></li>
		</ul>
		
	</div>
<div class="accordion_list"><h3><a href="#">Message</a></h3></div>

	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMessageList.php'>Message Report</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMessageListSent.php'>Message Sent</a></span></span></li>
		</ul>
		
	</div>
<div>
<div class="accordion_list"><h3><a href="#">Forum</a></h3> </div>
	<div>
	<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMakabayan.php'>Makabayan</a></span></span></li>
		    <li><span class='panel'> <span class='panel_h'><a href='viewFilipino.php'>Filipino</a></span></span></li>
             <li><span class='panel'> <span class='panel_h'><a href='viewEnglish.php'>English</a></span></span></li>
             		    	<li><span class='panel'> <span class='panel_h'><a href='viewMath.php'>Math</a></span></span></li>
			 		    	<li><span class='panel'> <span class='panel_h'><a href='viewScience.php'>Science</a></span></span></li>
                            		    	<li><span class='panel'> <span class='panel_h'><a href='viewOthers.php'>Others</a></span></span></li>


             </ul>
</div>
</div>

<div class="accordion_list"><h3><a href="#">Examination</a></h3> </div>
	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewQuestionMakabayan.php'>Makabayan</a></span></span></li>
		    <li><span class='panel'> <span class='panel_h'><a href='viewQuestionsFilipino.php'>Filipino</a></span></span></li>
             <li><span class='panel'> <span class='panel_h'><a href='viewQuestionsEnglish.php'>English</a></span></span></li>
             		    	<li><span class='panel'> <span class='panel_h'><a href='viewQuestionsMath.php'>Math</a></span></span></li>
			 		    	<li><span class='panel'> <span class='panel_h'><a href='viewQuestionsScience.php'>Science</a></span></span></li>


             </ul>
</div>
<div class="accordion_list"><h3><a href="#">Class Record</a></h3></div>
<div>
<ul>
<li><span class='panel'> <span class='panel_h'><a href='filesharing.php'>My&nbsp;Shared&nbsp;Files</a></span></span></li>
<li><span class='panel'> <span class='panel_h'><a href='viewSectionStudents.php'>My&nbsp;Class</a></span></span></li>

</div>


<li><span class='panel'><span class="panel_r"><a href='?q=logout'>Logout</a></span></span></li>
</ul>
<? endif;?>

<!--Admin-->
<? if($_SESSION['user'] == 'admin'):

 ?>
<div class="accordion_list"><h3><a href="#">Home</a></h3></div>
	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='admin.php'>News&nbsp;&amp;&nbsp;Events</a></span></span></li>
    	    	<li><span class='panel'> <span class='panel_h'><a href='viewStudents.php'>View&nbsp;Students</a></span></span></li>
            	<li><span class='panel'> <span class='panel_h'><a href='viewTeachers.php'>View&nbsp;Teachers</a></span></span></li>
		</ul>
		
	</div>

 
<div class="accordion_list"><h3><a href="#">Account Settings</a></h3></div>

	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='profile.php?sel=profile'>Profile</a></span></span></li>
        <li><span class='panel'> <span class='panel_h'><a href='editProfile.php?sel=changeInfo'>Edit Profile</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='editPass.php'>Edit Password</a></span></span></li>
		</ul>
		
	</div>
<div class="accordion_list"><h3><a href="#">Message</a></h3></div>

	<div>
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMessageList.php'>Message Report</a></span></span></li>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMessageListSent.php'>Message Sent</a></span></span></li>
		</ul>
		
	</div>

<div class="accordion_list"><h3><a href="#">Forum</a></h3> </div>
	<div>
	<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewMakabayan.php'>Makabayan</a></span></span></li>
		    <li><span class='panel'> <span class='panel_h'><a href='viewFilipino.php'>Filipino</a></span></span></li>
             <li><span class='panel'> <span class='panel_h'><a href='viewEnglish.php'>English</a></span></span></li>
             		    	<li><span class='panel'> <span class='panel_h'><a href='viewMath.php'>Math</a></span></span></li>
			 		    	<li><span class='panel'> <span class='panel_h'><a href='viewScience.php'>Science</a></span></span></li>
                            		    	<li><span class='panel'> <span class='panel_h'><a href='viewOthers.php'>Others</a></span></span></li>


             </ul>
								

</div>
<div class="accordion_list"><h3><a href="#">Examination</a></h3> </div>
	<div>
	<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='viewQuestionMakabayan.php'>Makabayan</a></span></span></li>
		    <li><span class='panel'> <span class='panel_h'><a href='viewQuestionsFilipino.php'>Filipino</a></span></span></li>
             <li><span class='panel'> <span class='panel_h'><a href='viewQuestionsEnglish.php'>English</a></span></span></li>
             		    	<li><span class='panel'> <span class='panel_h'><a href='viewQuestionsMath.php'>Math</a></span></span></li>
			 		    	<li><span class='panel'> <span class='panel_h'><a href='viewQuestionsScience.php'>Science</a></span></span></li>


             </ul>
</div>

<div class="accordion_list"><h3><a href="#">Class Record</a></h3></div>
<div>
<ul>
<li><span class='panel'> <span class='panel_h'><a href='filesharing.php'>My&nbsp;Shared&nbsp;Files</a></span></span></li>

</ul>


</div>

<div class="accordion_list"><h3><a href="#">Website Management</a></h3></div>
<div>
<ul>
<li><span class='panel'> <span class='panel_h'><a href='viewHome.php'>Home</a></span></span></li>
<li><span class='panel'> <span class='panel_h'><a href='viewAbout.php'>About</a></span></span></li>
<li><span class='panel'> <span class='panel_h'><a href='viewAnnouce.php'>Announcements</a></span></span></li>
<li><span class='panel'> <span class='panel_h'><a href='viewContact.php'>Contact&nbsp;Us</a></span></span></li>
<li><span class='panel'> <span class='panel_h'><a href='createGallery.php'>Gallery</a></span></span></li>
<li><span class='panel'> <span class='panel_h'><a href='viewEvents.php'>News & Events</a></span></span></li>
</ul>


</div>
<div class="accordion_list"><h3><a href="#">Maintenance</a></h3></div>
	<div>	
		<ul>
    	<li><span class='panel'> <span class='panel_h'><a href='createSection.php'>Add&nbsp;Section</a></span></span></li>
        <li><span class='panel'> <span class='panel_h'><a href='viewSection.php'>View&nbsp;Section</a></span></span></li>
		<li><span class='panel'> <span class='panel_h'><a href='createReplace.php'>Add&nbsp;Replace Words</a></span></span></li>
	    <li><span class='panel'> <span class='panel_h'><a href='viewReplace.php'>View&nbsp;Replace Words</a></span></span></li>
	

		 </div>
		
<li><span class='panel'><span class='panel_r'><a href='?q=logout'>Logout</a></span></span></li>

	</ul>
   
<? endif;?>
</div>
</div>


